package com.fengfeng.dao;

import com.fengfeng.domain.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: fengfeng
 * @Date: 2022/06/17/11:33
 * @Description: 业余爱好者
 */
@Repository
public interface StudentDao {
    //查询所有学生
    @Select("select * from student")
    List<Student> findAll();

    //添加学生
    @Insert("insert into student values(null,#{name},#{sex},#{address})")
    void add(Student student);
}
